<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<%@page import="avicit.platform6.core.locale.PlatformLocalesJSTL"%>
<%@page import="java.util.Locale"%>
<%@page import="avicit.platform6.api.session.SessionHelper"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="avicit.platform6.commons.utils.ViewUtil"%>
<%@ taglib prefix="sec"
	uri="/WEB-INF/tags/shiro.tld"%>
<%@page import="avicit.platform6.api.sysshirolog.impl.AfterLoginSessionProcess"%>
<%
	Object lang = session
			.getAttribute(AfterLoginSessionProcess.SESSION_CURRENT_LANGUAGE_CODE);
	String languageCode = "zh_CN";
	if (lang != null) {
		languageCode = lang.toString();
	}
	Locale locale = SessionHelper.getLocaleByUser(request);
	String orgId = SessionHelper.getCurrentOrgId(request);
%>
	
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>参考模板定义</title>
<base href="<%=ViewUtil.getRequestPath(request)%>">
<jsp:include
	page="/avicit/platform6/component/common/EasyUIJsInclude.jsp"></jsp:include>
<link href="static/css/custom/lantop/css/custom.css" type="text/css"  rel="stylesheet">
<jsp:include page="/avicit/im/common/ImUIJSCSSInclude.jsp"></jsp:include>
<script type="text/javascript"
	src="avicit/cbb/techclass/tabledefine/commtempletmanager/comm_templet_manager.js"></script>
<script type="text/javascript"
	src="avicit/cbb/techclass/tabledefine/commtempletmanager/locale/language_<%=languageCode%>.js"></script>
<script type="text/javascript">
var baseurl = "<%=ViewUtil.getRequestPath(request)%>";
	//此事件必须放在jsp中,不能提取到js中,否则不能加载数据
	$(function() {
		$('#addTempField').hide();
		$('#saveTempField').hide();
		$('#deleteTempField').hide();
		$('#copyField').hide();
		$('#export').hide();
		$('#importExcel').hide();
		$('#exportExcelMoudle').hide();
		$('#configField').hide();

		$('#searchField').hide();
		$('#appendCode').hide();
		$('#saveCode').hide();
		$('#deleteWcode').hide();
		$('#selectCode').hide();
		document.getElementById("muAdd").style.display = 'none';
		document.getElementById("muEdit").style.display = 'none';
		document.getElementById("muRemove").style.display = 'none';
		sysId = document.getElementById("sysId").value;
		//加载分类树
		reloadCommTempletInfoTree();
		reloadCommTempletRootTree();
		
	});
	var orgId = "<%=orgId%>";
</script>
<style type="text/css">
.textbox {
	border: solid 1px #a5acb5;
}

.input,img {
	vertical-align: middle;
}
/* tree 自适应 */
#cc .panel.layout-panel.layout-panel-center {
    width: 100% !important;
}
#cc div#treeFl {
    width: 98% !important;
}
#cc .panel.layout-panel.layout-panel-south{
 width: 100% !important;
}
#cc .panel-body.panel-body-noheader.layout-body {
    width: 98% !important;
}
#codeDataDiv table.datagrid-htable {
    width: 100%;
}
</style>
</head>
<body id="myBody" class="easyui-layout" fit="true">
	<input id="sysId" value="<%=request.getParameter("sysId")%>"
		type="hidden">
	<%-- 参考模板树 --%>
	<div
		data-options="region:'west',title:'<%-- <%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree","i18n.lantop",locale)%> --%>初始元数据树',split:true"
		style="width: 220px; height: 0; overflow: hidden; font-size: 0;">
		<div id="cc" class="easyui-layout" style="height: 600px;"> 
		    <!-- 判断是否为总部，如果不是则显示 -->
		    <%
		    	if (!orgId.equals("ORG_ROOT")) {
		    %>
		    	<!--子组织  -->
			    <div data-options="region:'south'" style="height:300px;border-top:1px solid #dedede">
			    	<ul id="commTempletInfoTree" class="easyui-tree"></ul>
			    </div>
		    <%
		    	}
		    %>
		    	<!-- 主组织  -->
			    <div data-options="region:'center'" style="padding:5px;"  id="treeFl">
			    	<ul id="commTempletRootTree" class="easyui-tree"></ul>
			    </div>
		</div>  
		<div id="mm" class="easyui-menu" style="width: 120px;">
			<sec:accesscontrollist hasPermission="3"
				domainObject="commtempletmanager_comm_templet_manager_button_addForm">
				<%-- 添加 --%>
				<div onclick="addForm()" data-options="iconCls:'icon-im-add'"
					id="muAdd"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree.add",
								"i18n.lantop", locale)%></div>
			</sec:accesscontrollist>
			<sec:accesscontrollist hasPermission="3"
				domainObject="commtempletmanager_comm_templet_manager_button_editForm">
				<%-- 编辑 --%>
				<div onclick="editForm()" data-options="iconCls:'icon-im-edit'"
					id="muEdit"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree.edit",
								"i18n.lantop", locale)%></div>
			</sec:accesscontrollist>
			<sec:accesscontrollist hasPermission="3"
				domainObject="commtempletmanager_comm_templet_manager_button_deleteForm">
				<%-- 删除 --%>
				<div onclick="deleteForm()" data-options="iconCls:'icon-im-remove'"
					id="muRemove"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.referenceTemplateTree.delete",
								"i18n.lantop", locale)%></div>
			</sec:accesscontrollist>
		</div>
	</div>
	<div data-options="region:'center'" style="height: 0; font-size: 0;">
		<div class="easyui-layout" data-options="fit:true,split:true">
			<%-- 基础字段表 --%>
			<div data-options="region:'center',title:'<%=PlatformLocalesJSTL
					.getBundleValue(
							"lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable",
							"i18n.lantop", locale)%>'" id="tgrid"
				style="height: 0; font-size: 0;">
				<div id="tb" style="padding: 10px 5px;height:27px;">
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_templet_manager_button_addField">
						<%-- 添加字段 --%>
						<a class="easyui-linkbutton selbtnc" iconCls="icon-im-add"
							onclick="append();" href="javascript:void(0);" id="addTempField"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.addField",
								"i18n.lantop", locale)%></a>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_templet_manager_button_deleteField">
						<%-- 删除字段 --%>
						<a class="easyui-linkbutton selbtnc" iconCls="icon-im-remove"
							onclick="deleteDetailForm();" href="javascript:void(0);"
							id="deleteTempField"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.deleteField",
								"i18n.lantop", locale)%></a>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_templet_manager_button_saveField">
						<%-- 保存 --%>
						<a class="easyui-linkbutton selbtnc" iconCls="icon-im-save"
							onclick="accept();" href="javascript:void(0);" id="saveTempField"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.save",
								"i18n.lantop", locale)%></a>
					</sec:accesscontrollist>
					<%
						if (orgId.equals("ORG_ROOT")) {
					%>
						<sec:accesscontrollist hasPermission="3"
							domainObject="commtempletmanager_comm_templet_manager_button_config">
							<%-- 初始字段维护 --%>
							<a  style="padding:0px  2px;border:1px solid #dedede;height:27px;line-height:27px;" class="easyui-linkbutton" plain="true"
								iconCls="icon-im-newinitfield" onclick="config();"
								href="javascript:void(0);" id="configField"><%=PlatformLocalesJSTL
							.getBundleValue(
									"lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.button.initFieldMaintain",
									"i18n.lantop", locale)%></a>
						</sec:accesscontrollist>
					<%
						}
					%>
					<!--   
						SanXiaFiles Create By Tangkun End 
						-->

						<div style="background:white;width:100px;height:25px;border-radius:3px;border:1px solid #ccc;float:right;">
						<input  id="query" onblur="getResultByInput()" onkeydown="keyDownQuery()" placeholder="快速检索" type="text" style="float:left;box-sizing:border-box;padding-left:5px;width:70%;height:25px;outline:none;border:none;"/>
						<img src="avicit/im/lantop/common/search/image/icon_tool14.png" style="float:right;margin-top:2px;margin-right:2px;width:20%;cursor: pointer;">

						</div>


						<!--
						 SanXiaFiles Create By Tangkun End  
					-->
					<%--SanXiaFiles Update Tangkun Start  
					 <sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_templet_manager_button_LanguageForm">
						语言设置
						<a class="easyui-linkbutton" iconCls="icon-tools" plain="true" onclick="openLanguageForm('commTempletFieldDataGrid','1');" href="javascript:void(0);"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.languageSet","i18n.lantop",locale)%></a>
					</sec:accesscontrollist> 
					SanXiaFiles Update By Tangkun End--%>

				</div>
				<table id="commTempletFieldDataGrid" class="easyui-datagrid"
					data-options="
				rownumbers: true,
				animate: true,
				collapsible: false,
				fitColumns: false,
				autoRowHeight: false,
				singleSelect: true,
				pagination:true,
				pageSize:100, 
				pageList:[100,150,200], 
	    		striped:true,
				fit:true,
				method: 'post',
				toolbar: '#tb',
				checkOnSelect:false,
				selectOnCheck:false,
				onLoadSuccess : onLoadSuccessData,
				onClickCell:onClickCell
			">
					<thead>
						<tr>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_id">
								<th data-options="field:'id', halign:'center',checkbox:true"
									title="主键ID" width="20">主键ID</th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_colLabel">
								<%-- 字段中文名 --%>
								<th
									data-options="field:'colLabel', halign:'center', align:'center', sortable:false, editor:{type:'validatebox',options:{required:true,validType:'length[0,20]'}}"
									width="100" title="字段中文名"><img
									src="avicit/im/common/im_themes_extend/required.gif" alt="必填"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.fieldCHNName",
								"i18n.lantop", locale)%></th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_colName">
								<%-- 字段名 --%>
								<th
									data-options="field:'colName', halign:'center', align:'center', sortable:false,editor:{type:'validatebox',options:{required:true,validType:'length[0,30]'}}"
									width="100" title="字段名"><img
									src="avicit/im/common/im_themes_extend/required.gif" alt="必填">
									<%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.fieldName",
								"i18n.lantop", locale)%></th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_colType">
								<%-- 字段类型 --%>
								<th
									data-options="field:'colType', halign:'center', align:'center', sortable:false,editor:{type:'combobox',options:{onSelect : typeSelect,onHidePanel: typeOnHidePanel,required:true,panelHeight: 'auto',valueField:'lookupCode',textField:'lookupName',data:[{lookupCode:'string',lookupName:'字符串'},{lookupCode:'integer',lookupName:'整型'},{lookupCode:'date',lookupName:'日期时间型'},{lookupCode:'float',lookupName:'浮点型'},{lookupCode:'blob',lookupName:'BLOB'},{lookupCode:'clob',lookupName:'CLOB'}],editable:false}},formatter:fomaterColType"
									width="100" title="字段类型"><img
									src="avicit/im/common/im_themes_extend/required.gif" alt="必填"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.fieldType",
								"i18n.lantop", locale)%></th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_colLength">
								<%-- 长度 --%>
								<th
									data-options="field:'colLength', halign:'center', align:'center', sortable:false,editor:{type:'numberbox',options:{'validType':'length[0,5]'}}"
									width="100" title="长度"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.length",
								"i18n.lantop", locale)%></th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_colDecimal">
								<%-- 小数位数 --%>
								<th
									data-options="field:'colDecimal', halign:'center', align:'center', sortable:false,editor:{type:'numberbox',options:{'validType':'length[1,6]'}}"
									width="100" title="小数位数"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.decimalNum",
								"i18n.lantop", locale)%></th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_colIsSys">
								<%-- 系统字段 --%>
								<th
									data-options="field:'colIsSys', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsSys"
									width="100" title="系统字段"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.systemField",
								"i18n.lantop", locale)%></th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_colIsDisplay">
								<%-- 是否可见 --%>
								<th
									data-options="field:'colIsDisplay', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsShow"
									width="100" title="是否可见"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.isVisible",
								"i18n.lantop", locale)%></th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_colIsMust">
								<%-- 是否必著 --%>
								<th
									data-options="field:'colIsMust', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsMust"
									width="100" title="是否必著"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.isMustRecord",
								"i18n.lantop", locale)%></th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_colIsMust">
								<%-- 是否显示（添加/编辑） --%>
								<th
									data-options="field:'colIsVisible', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsVisible"
									width="100" title="是否显示（添加/编辑）"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.isShow(add/edit)",
								"i18n.lantop", locale)%></th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_colIsMust">
								<%-- 是否编辑（添加/编辑） --%>
								<th
									data-options="field:'colIsEdit', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsEdit"
									width="100" title="是否编辑（添加/编辑）"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.isEdit(add/edit)",
								"i18n.lantop", locale)%></th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_colIsMust">
								<%-- 表格显示 --%>
								<th
									data-options="field:'colIsTabVisible', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsTabVisible"
									width="100" title="表格显示"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.tableShow",
								"i18n.lantop", locale)%></th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_colIsMust">
								<%-- 详细显示 --%>
								<th
									data-options="field:'colIsDetail', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsDetail"
									width="100" title="详细显示"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.detailShow",
								"i18n.lantop", locale)%></th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_colIsMust">
								<%-- 查询字段 --%>
								<th
									data-options="field:'colIsSearch', halign:'center', align:'center', sortable:false,editor:{type:'text'},formatter:fomaterIsSearch"
									width="100" title="查询字段"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.searchField",
								"i18n.lantop", locale)%></th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_colIsMust">
								<%-- 类型 --%>
								<th
									data-options="field:'colDropdownType', halign:'center', align:'center', sortable:false,editor:{type:'combobox',options:{'validType':'length[0,50]',required:true,panelHeight: 'auto',valueField:'lookupCode',textField:'lookupName',data:[{lookupCode:'0',lookupName:'无'},{lookupCode:'1',lookupName:'参选'},{lookupCode:'2',lookupName:'只选'},{lookupCode:'3',lookupName:'选择'}],editable:false,onSelect:onSelectCom,onHidePanel: selectTypeOnHidePanel}},formatter:fomaterType"
									width="100" title="下拉类型"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.type",
								"i18n.lantop", locale)%></th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_colRuleTitle">
								<%-- 生成规则 --%>
								<th
									data-options="field:'colRuleTitle', halign:'center', align:'center', sortable:false, editor:{type:'text'}"
									width="100" title="顺序"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.createRule",
								"i18n.lantop", locale)%></th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_colRuleName">
								<th
									data-options="field:'colRuleName',halign:'center', align:'center', editor:{type:'text'},hidden:true"
									width="100" title="生成规则英文">生成规则英文</th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_customPath">
								<th
									data-options="field:'customPath',halign:'center', align:'center', editor:{type:'text'},hidden:true"
									width="100" title="路径">路径</th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_colOrder">
								<%-- 表单顺序 --%>
								<th
									data-options="field:'colOrder', halign:'center', align:'center', sortable:false,editor:{type:'numberbox',options:{'validType':'length[0,4]'}}"
									width="100" title="表单顺序">表单顺序</th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_attribute11">
								<%-- 表格顺序 --%>
								<th
									data-options="field:'attribute11', halign:'center', align:'center', sortable:false,editor:{type:'numberbox',options:{'validType':'length[0,4]'}}"
									width="100" title="表格顺序">表格顺序</th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_remark">
								<%-- 备注 --%>
								<th
									data-options="field:'remark', halign:'center', align:'center', sortable:false,editor:{type:'validatebox',options:{'validType':'length[0,200]'}}"
									width="100" title="备注"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.basicFieldTable.table.comment",
								"i18n.lantop", locale)%></th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_isNew">
								<th
									data-options="field:'isNew', halign:'center', align:'center',hidden: true,editor:{type:'text'}"
									width="100" title="是否新建">是否新建</th>
							</sec:accesscontrollist>
						</tr>
					</thead>
				</table>
			</div>
			<%-- 通用代码表 --%>
			<div data-options="region:'east',title:'<%=PlatformLocalesJSTL
					.getBundleValue(
							"lantop.basicdatamanager.referenceTemplateDefine.generalCodeTable",
							"i18n.lantop", locale)%>',split:true"
				style="height: 0; overflow: hidden; font-size: 0;" id="codeDataDiv">
				<div id="tb2" style="padding:10px 5px;height:27px;">
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_templet_manager_button_appendCode">
						<%-- 添加 --%>
						<a class="easyui-linkbutton selbtnc" iconCls="icon-im-add"
							onclick="appendCode();" href="javascript:void(0);"
							id="appendCode"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.generalCodeTable.button.add",
								"i18n.lantop", locale)%></a>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_templet_manager_button_saveCode">
						<%-- 保存 --%>
						<a class="easyui-linkbutton selbtnc" iconCls="icon-im-save"
							onclick="saveCode();" href="javascript:void(0);" id="saveCode"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.generalCodeTable.button.save",
								"i18n.lantop", locale)%></a>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_templet_manager_button_deleteWcode">
						<%-- 删除 --%>
						<a class="easyui-linkbutton selbtnc" iconCls="icon-im-remove"
							onclick="deleteWcode();" href="javascript:void(0);"
							id="deleteWcode"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.generalCodeTable.button.delete",
								"i18n.lantop", locale)%></a>
					</sec:accesscontrollist>
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_templet_manager_button_selectCode">
						<%-- 引用 --%>
						<a class="easyui-linkbutton selbtnc"
							iconCls="icon-im-newinsert" onclick="selectCode();"
							href="javascript:void(0);" id="selectCode"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.generalCodeTable.button.quote",
								"i18n.lantop", locale)%></a>
					</sec:accesscontrollist>
					<%--SanXiaFiles Update Tangkun Start 
					<sec:accesscontrollist hasPermission="3"
						domainObject="commtempletmanager_comm_templet_manager_button_LanguageForm">
						语言设置
						<a class="easyui-linkbutton" iconCls="icon-tools" plain="true" onclick="openLanguageForm('commTempletCodeDataGrid','2');" href="javascript:void(0);"><%=PlatformLocalesJSTL.getBundleValue("lantop.basicdatamanager.referenceTemplateDefine.languageSet","i18n.lantop",locale)%></a>
					</sec:accesscontrollist> 
					SanXiaFiles Update By Tangkun End --%>
				</div>
				<table id="commTempletCodeDataGrid" class="easyui-datagrid"
						data-options="
								rownumbers: true,
								animate: true,
								collapsible: false,
								fitColumns:false,
								autoRowHeight: false,
								singleSelect: true,
								selectOnCheck : false,
								checkOnSelect : false,
								pagination:true,
								pageSize:100, 
								pageList:[100,150,200], 
					    		striped:true,
								fit:true,
								method: 'post',
								toolbar: '#tb2',
								onLoadSuccess : onLoadSuccessData,
								onClickRow : onClickRowCode,
								url: 'platform/aos/commtempletmanagerController/getCommTempletCodeData.json'
						">
					<thead>
						<tr>

							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_ID">
								<th data-options="field:'ID', halign:'center',checkbox:true"
									title="主键ID" width="20">主键ID</th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_CODE_ORDER">
								<%-- 顺序 --%>
								<th
									data-options="field:'CODE_ORDER', halign:'center', align:'center', sortable:false,editor:{type:'numberbox',options:{required:true,'validType':'length[0,10]'}}"
									width="100" title="顺序"><img
									src="avicit/im/common/im_themes_extend/required.gif" alt="必填"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.generalCodeTable.table.order",
								"i18n.lantop", locale)%></th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_LOOKUP_NAME">
								<%-- 显示值 --%>
								<th
									data-options="field:'LOOKUP_NAME', halign:'center', align:'center', sortable:false, editor:{type:'validatebox',options:{required:true,'validType':'length[0,100]'}}"
									width="100" title="显示值"><img
									src="avicit/im/common/im_themes_extend/required.gif" alt="必填"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.generalCodeTable.table.showValue",
								"i18n.lantop", locale)%></th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_LOOKUP_CODE">
								<%-- 真实值 --%>
								<th
									data-options="field:'LOOKUP_CODE', halign:'center', align:'center', sortable:false, editor:{type:'validatebox',options:{required:true,'validType':'length[0,100]'}}"
									width="120" title="真实值"><img
									src="avicit/im/common/im_themes_extend/required.gif" alt="必填"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.generalCodeTable.table.trueValue",
								"i18n.lantop", locale)%></th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_CODE_IS_VALID">
								<%-- 是否有效 --%>
								<th
									data-options="field:'CODE_IS_VALID', halign:'center', align:'center', sortable:false,editor:{type:'combobox',options:{'validType':'length[0,4]',required:true,panelHeight: 'auto',valueField:'lookupCode',textField:'lookupName',data:[{lookupCode:'Y',lookupName:'有效'},{lookupCode:'N',lookupName:'无效'}],editable:false}},formatter:fomaterVa"
									width="120" title="否有效"><img
									src="avicit/im/common/im_themes_extend/required.gif" alt="必填"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.generalCodeTable.table.iseffective",
								"i18n.lantop", locale)%></th>
							</sec:accesscontrollist>
							<sec:accesscontrollist hasPermission="3"
								domainObject="commtempletmanager_comm_templet_manager_datagrid_CTYPE">
								<%-- 类型 --%>
								<th
									data-options="field:'CTYPE', halign:'center', align:'center', sortable:false,formatter:fomaterCType"
									width="100" title="类型"><%=PlatformLocalesJSTL
						.getBundleValue(
								"lantop.basicdatamanager.referenceTemplateDefine.generalCodeTable.table.type",
								"i18n.lantop", locale)%></th>
							</sec:accesscontrollist>
						</tr>
					</thead>
				</table>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript" src="static/js/platform/index/js/divscroll.js" ></script>
<script>
//在此给div定义宽度（当easyui解析到该div时才能将宽度加上去）
$("#codeDataDiv").css("width",($(window).width() - 200) * 0.5 + "px");
	$(function(){
		$(".datagrid-view2>.datagrid-body").perfectScrollbar();
		$("#treeFl").perfectScrollbar();
	});
</script>
</html>
